<template>
	<view class="menu-list">
		<view class="menu-text">
			<u--text type="warning" text="管理栏目"></u--text>
		</view>
		<view class="list-item" v-for="(item,index) in list" :key="index" @click="linkPage(item)">
			<view class="item-icon">
				<i :class="item.icon"></i>
			</view>
			<view class="item-text u-line-1">{{item.name}}</view>
		</view>
	</view>
</template>

<script>
	const LIST = [
		{
			name: '闲置审核',
			icon: 't-icon-shenhe',
			src: ''
		},
		{
			name: '用户管理',
			icon: 't-icon-drxx10',
			src: ''
		}
	]
	export default {
		data() {
			return {
				list: LIST
			}
		},
		computed: {},
		methods: {
			// 前往指定页面
			linkPage(item) {
				if (item.src == '') {
					uni.$u.toast('敬请期待')
				} else {
					this.$navTo(item.src)
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.menu-list {
		background: #FFFFFF;
		box-shadow: 0rpx 0rpx 57rpx 0rpx rgba(169, 188, 224, 0.26);
		border-radius: 20rpx;
		height: 300rpx;
		
		.menu-text {
			padding: 10rpx 0rpx 0rpx 25rpx;
		}
		
		.list-item {
			float: left;
			padding: 15rpx 30rpx 15rpx 30rpx;
			width: 115rpx;
			height: 115rpx;
		
			.item-icon {
				margin-left: 15rpx;
				width: 65rpx;
				height: 65rpx;
		
				i {
					width: 65rpx;
					height: 65rpx;
				}
			}
		
			.item-text {
				flex-grow: 1;
				overflow: hidden;
				padding: 5rpx 0 0 0rpx;
				font-size: 20rpx;
				color: #000000;
				letter-spacing: 2rpx;
				text-indent: 2rpx;
			}
		}
	}
</style>